package com.cyd.springboot02.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author keyer
 * @Description : 通过配置文件的字面量拿到一个bean
 * Created by cyd on 2021-05-06 17:14:52
 */
@Component
@ConfigurationProperties(prefix = "author")
@PropertySource(value = {"classpath:author.properties"})
@Data
public class AuthorSettings {
    private String name;
    private String age;
}
